import request from '@/utils/request'

export function getInfo(query) {
  return request({
    url: '/scm/customerPriced/page',
    method: 'get',
    params: query
  })
}
export function getInfo1(query) {
  return request({
    url: '/scm/customerPriced/getCheckList/',
    method: 'get',
    params: query
  })
}

export function upLoad() {
  return request({
    url: '/mopProductinfo/page',
    method: 'post',
    params: query
  })
}
export function impScmCustomerPricedData(file) {
  return request({
    url: '/scm/customerPriced/impScmCustomerPricedData',
    method: 'post',
    data: file
  })
}
export function dailyMaterial(query) {
  return request({
    url: '/scm/material/page',
    method: 'get',
    params: query
  })
}
export function check(data) {
  return request({
    url: '/scm/customerPriced/check',
    method: 'put',
    data
  })
}
export function checkput(id) {
  return request({
    url: `/scm/customerPriced/needCheck/${id}`,
    method: 'get'

  })
}
export function getLMPrice(obj) {
  return request({
    url: `/scm/material/getLMPrice`,
    method: 'get',
    params: obj
  })
}
export function addMaterial(data) {
  return request({
    url: `/scm/material/add`,
    method: 'put',
    data
  })
}
export function listExpExcel(data) {
  return request({
    url: `/scm/customerPriced/doExport`,
    responseType: 'arraybuffer',
    method: 'get',
    params: data
  })
}
export function getPriceByLastData(data) {
  return request({
    url: `/scm/customerPriced/getPriceByLastData/` + data,
    method: 'put'

  })
}
export function delcancel(id) {
  return request({
    url: `/scm/customerPriced/` + id,
    method: 'delete'

  })
}
export function getLTMPrice() {
  return request({
    url: `/scm/material/getLTMPrice`,
    method: 'get'

  })
}

export function impdaliy(id, file) {
  return request({
    url: `/scm/material/materialDetailUploadFile/${id}/1`,
    method: 'post',
    data: file
  })
}
export function downLoadfile(id) {
  return request({
    url: `/scm/material/downloadMaterialDetailFile/${id}/1`,
    method: 'get',
    responseType: 'arraybuffer'
  })
}
